<?php

class sgeAuditableRouteCollection extends sgeRouteCollection
{

	protected function getRouteForHistoric()
	{
		return new $this->routeClass(
			sprintf('%s/:%s/historial.:sf_format', $this->options['prefix_path'], $this->options['column']),
			array_merge(array('module' => $this->options['module'], 'action' => 'historic', 'sf_format' => 'html'), $this->options['default_params']),
			array_merge($this->options['requirements'], array('sf_method' => array('get'))),
			array('model' => $this->options['model'], 'type' => 'object', 'method' => $this->options['model_methods']['object'])
		);
	}
	
	protected function getRouteForCompare()
	{
		return new $this->routeClass(
			sprintf('%s/:%s/historial/:%s.:sf_format', $this->options['prefix_path'], $this->options['column'], 'version'),
			array_merge(array('module' => $this->options['module'], 'action' => 'compare', 'sf_format' => 'html'), $this->options['default_params']),
			array_merge($this->options['requirements'], array('sf_method' => array('get'))),
			array('model' => $this->options['model'], 'type' => 'object', 'method' => $this->options['model_methods']['object'])
		);
	}

	protected function getRouteForDeleteVersion()
	{
		return new $this->routeClass(
			sprintf('%s/:%s/eliminar_version.:sf_format', $this->options['prefix_path'], $this->options['column']),
			array_merge(array('module' => $this->options['module'], 'action' => 'deleteVersion', 'sf_format' => 'html'), $this->options['default_params']),
			array_merge($this->options['requirements'], array('sf_method' => array('delete'))),
			array('model' => $this->options['model'], 'type' => 'object', 'method' => $this->options['model_methods']['object'])
		);
	}

	protected function getDefaultActions()
	{
		return array_merge(parent::getDefaultActions(), array('historic', 'compare', 'deleteVersion'));
	}

}


